﻿<%@ Page Language="C#" %>
<%@ Import Namespace="Com.CodeProject.Pop3" %>
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="Shpm.System.Db" %>
<%@ Register TagPrefix="shpm" TagName="SystemMenu" Src="~/System/Tag/SystemMenuTag.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
    
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Write(Shpm.System.Constants.COMMON_DICTIONARY_PATH);
        
    /*
        Pop3MailClient DemoClient = new Pop3MailClient("10.0.0.1", 110, false, "pm022", "DVDKkBTHH6k2buez");
        DemoClient.IsAutoReconnect = true;

        //remove the following line if no tracing is needed
        DemoClient.Trace += new TraceHandler(Console.WriteLine);
        DemoClient.ReadTimeout = 60000; //give pop server 60 seconds to answer

        //establish connection
        DemoClient.Connect();

        //get mailbox statistics
        int NumberOfMails, MailboxSize;
        DemoClient.GetMailboxStats(out NumberOfMails, out MailboxSize);

        DemoClient.Disconnect();

        Ajax.Utility.RegisterTypeForAjax(typeof(app_tantest_cal_aspx));
    */

    }

    [Ajax.AjaxMethod()]
    public int ServerSideAdd(int firstNumber, int secondNumber)
    {
        HttpRequest req = HttpContext.Current.Request;

        byte[] b = new byte[req.TotalBytes];
        req.InputStream.Position = 0;
        req.InputStream.Read(b, 0, b.Length);

        string r = System.Text.Encoding.UTF8.GetString(b);
        
        return firstNumber + secondNumber;
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      <script language="javascript">
        function f1() {
        var response = app_tantest_cal_aspx.ServerSideAdd(100,99);
        alert(response.value);
        }
      </script>
<input type="button" onclick="f1()" />
        <asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="White" BorderWidth="1px" Font-Names="Verdana" Font-Size="9pt" ForeColor="Black" Height="190px" NextPrevFormat="FullMonth" Width="270px">
            <SelectedDayStyle BackColor="#333399" ForeColor="White" />
            <TodayDayStyle BackColor="#CCCCCC" />
            <OtherMonthDayStyle ForeColor="#999999" />
            <NextPrevStyle Font-Bold="True" Font-Size="8pt" ForeColor="#333333" VerticalAlign="Bottom" />
            <DayHeaderStyle Font-Bold="True" Font-Size="8pt" />
            <TitleStyle BackColor="White" BorderColor="Black" BorderWidth="4px" Font-Bold="True"
                Font-Size="12pt" ForeColor="#333399" />
        </asp:Calendar>
    
    </div>

    <shpm:SystemMenu PostBackUrl="~/App/System/SalesMainForm.aspx" Text="■家访管理" runat="server">
    </shpm:SystemMenu>

    </form>
</body>
</html>
